﻿using Colorful.Furniture.IEntity;
using System;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.ErpInventoryManagement;

/// <summary>
///  库存产品日志
/// </summary>
[Table(Name = "erp_bbs_inventory_log")]
public class InventoryLog : AuditTenantSoftDeleteAggregateRoot
{
    /// <summary>
    ///   编码
    /// </summary>
    [Column(Name = "id")]
    public Guid Id { get; set; }

    /// <summary>
    ///  库存产品编码
    /// </summary>
    [Column(Name = "inventory_id")]
    public Guid? InventoryId { get; set; }

    /// <summary>
    ///  产品
    /// </summary>
    [Column(Name = "product", StringLength = 50)]
    public string Product { get; set; }

    /// <summary>
    ///  产品编号
    /// </summary>
    [Column(Name = "product_no", StringLength = 50)]
    public string ProductNo { get; set; }

    /// <summary>
    ///  改变数量,入库就是正数库存量，出库就是负数库存量
    /// </summary>
    [Column(Name = "change_qty_value", Scale = 3)]
    public decimal? ChangeQtyValue { get; set; }

    /// <summary>
    ///  变化之前值
    /// </summary>
    [Column(Name = "before_qty1", Scale = 3)]
    public decimal? BeforeQty1 { get; set; }

    /// <summary>
    ///  变化之后值
    /// </summary>
    [Column(Name = "before_qty2", Scale = 3)]
    public decimal? BeforeQty2 { get; set; }

    /// <summary>
    ///  变化之前数量
    /// </summary>
    [Column(Name = "after_qty1", Scale = 3)]
    public decimal? AfterQty1 { get; set; }

    /// <summary>
    ///  变化之后数量
    /// </summary>
    [Column(Name = "after_qty2", Scale = 3)]
    public decimal? AfterQty2 { get; set; }

    /// <summary>
    ///  备注
    /// </summary>
    [Column(Name = "remark", StringLength = 2000)]
    public string Remark { get; set; }

    /// <summary>
    ///  库存产品
    /// </summary>
    public Inventory Inventory { get; set; }
}